package com.allen.imsystem.message.model.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ApplyNotify对象", description="")
public class ApplyNotify implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "通知接收者uid")
    private String uid;

    @ApiModelProperty(value = "通知类型 1->申请被通过通知， 2->收到新申请通知")
    private Integer type;

    @ApiModelProperty(value = "好友申请的id，关联friend_apply表")
    private Integer applyId;

    @ApiModelProperty(value = "0->删除，1->有效")
    private Boolean status;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    public ApplyNotify() {
    }

    public ApplyNotify(String uid, Integer applyId, Integer type) {
        this.uid = uid;
        this.applyId = applyId;
        this.type = type;
        this.status = true;
    }
}
